package cn.middle.application.service.impl;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.middle.common.base.mapper.BaseMapper;
import com.middle.common.base.service.impl.BaseServiceImpl;
import com.middle.common.result.Page;

import cn.middle.application.entity.DoorUser;
import cn.middle.application.mapper.DoorUserMapper;
import cn.middle.application.service.DoorUserService;

@Service
public class DoorUserServiceImpl extends BaseServiceImpl<DoorUser> implements DoorUserService {

	@Autowired
	private DoorUserMapper doorUserMapper;
	
	@Override
	public BaseMapper<DoorUser> getDao() {
		return doorUserMapper;
	}

	@Override
	public Page<DoorUser> listOrName(int page, int pageSize, String name) {
		PageHelper.startPage(page,pageSize);
		return new Page<>(new PageInfo<>(doorUserMapper.listOrName(name)));
	}
}
